

function validate(){
	
	var regno = document.getElementById('txtRegno');
	var subgr = document.getElementById('sltSubgr');
	
	if(notEmpty(regno,"Enter Registration Number")){
		if(isNumeric(regno, "Registration Number should be numeric ")){
		if(madeSelection(subgr, "Select the subject code")){
			loadXMLDoc();
			

		   }
	     return false;
		 }
	return false;
	}
	
	return false;
}
 function loadXMLDoc()
{


if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    var x=xmlhttp.responseText;
	window.open("../report/payment_reciept.php?pid="+x,'_blank');
      //document.getElementById("myForm").reset(); 
     //document.getElementById("ajaxDiv").innerHTML=xmlhttp.responseText;
    }
  }

    
	var regno = document.getElementById('txtRegno').value;
	var subgr = document.getElementById('sltSubgr').value;
	
	
	
	var queryString ="?regno=" + regno +"&subgr="+subgr;
	
xmlhttp.open("GET","../logic/add/payment_handle.php"+queryString ,true);
xmlhttp.send();
}



function checkregno(){
	
var regno = document.getElementById('txtRegno');

if(notEmpty(regno,"Search cannot be empty")){

 if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
   xmlhttp=new XMLHttpRequest();
    }
  else
   {// code for IE6, IE5
 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
    xmlhttp.onreadystatechange=function()
     {
 if (xmlhttp.readyState==4 && xmlhttp.status==200)
  {
									//document.getElementById("ajaxDiv").innerHTML=xmlhttp.responseText; 
									 
   var x=xmlhttp.responseText;
if(x=="false"){
									
  document.getElementById("ajaxDiv1").innerHTML="Invalid Registration No";
  document.getElementById('txtRegno').value="";
	}else{
  document.getElementById("ajaxDiv1").innerHTML=x; 
									
			}
			}
            }
								
  var y=document.getElementById('txtRegno').value;
  var queryString ="?regno=" + y;
  xmlhttp.open("GET","../logic/load/check_reg.php"+queryString,true);
  xmlhttp.send();	  
	
	
}
}
	
	
	
		function clearx()
{
	
	 document.getElementById("myForm").reset(); 
     document.getElementById("ajaxDiv").innerHTML="";
	 document.getElementById("ajaxDiv1").innerHTML="";
}
	function al(){
		
		alert("xzczc");
		}